<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>{$title|default=''|htmlentities} – {$site.name|htmlentities}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="{$keywords|htmlentities}">
    <meta name="description" content="{$description|htmlentities}">
    <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
    <link href="/assets/css/frontend.css" rel="stylesheet">
    <link href="/assets/css/common.css" rel="stylesheet">
    <script type="text/javascript">
        var require = {
            config: JSON.parse('{$config|json_encode}')
        };
        const user_id = "{$id}";
    </script>
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="__CDN__/assets/js/html5shiv.js"></script>
    <script src="__CDN__/assets/js/respond.min.js"></script>
    <![endif]-->
    <style>
        .whitebg{
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 1) 100%);
            background: -webkit-linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 1) 100%); 
            background: -moz-linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 1) 100%); 
            background: -o-linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 1) 100%); 
            background: -ms-linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 1) 100%); 
            min-height:100px;
            padding-top: 20px;
            display: flex;flex-direction: column;justify-content: center;align-items: center;
            color:#333;font-size: 15px;
       }
       .alert-warning {
            color: #e08e0b;
            border-color: #e08e0b;
            background-color: #fff;
        }
        .resource-con{
        flex:1;display:flex;flex-direction: column; font-size: 14px;
    }
    </style>
</head>

<body>
    <div id="app">
        <div id="loading" ref="loadNode">
            <div id="loading-center">
                <div id="loading-center-absolute">
                    <div class="object" id="object_four"></div>
                    <div class="object" id="object_three"></div>
                    <div class="object" id="object_two"></div>
                    <div class="object" id="object_one"></div>
                </div>
            </div>
        </div>
        <header class="header">
            <div class="header-container">
                <div class="header-left">
                    <div class="header-logo" @click="handle('/',false)">
                        <img src="__CDN__/assets/img/logo.png" alt="Logo" class="header-logo">
                        <span class="header-title">{$site.name|htmlentities}</span>
                    </div>
                    <nav class="header-nav">
                        <a href="javascript:;" @click="handle(item.url,item.is_login)" :class="item.url =='/'?`nav-item active`:`nav-item`" v-for="(item,index) in head">{{item.name}}</a>
                    </nav>
                </div>
                <div class="header-right"  v-if="user">
                    <i class="fa fa-list-alt header-icon" @click="handle('/notice',false)"></i>
                    <div class="user-info" data-toggle="dropdown">
                        <img :src="user.avatar || '__CDN__/assets/img/avatar.png'" class="user-avatar">
                        <span class="user-name">{{ user.nickname }}</span>
                    </div>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header" @click="handle('/user/info')">
                            <img :src="user.avatar" class="img-circle" alt="">
                            <p>
                                <div>{{ user.nickname }}</div>
                                <small>闻道ID:{{user.id}}</small>
                            </p>
                        </li>
                        <li class="user-body">
                            <div class="user-list" @click="handle('/user/info')">
                                <div>我的资料</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                            <div  class="user-list" @click="handle('/user/favorites')">
                                <div>我的收藏</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                            <div class="user-list" @click="handle('/user/adviser')">
                                <div>我的实战</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                        </li>
                        <li class="user-body">
                            <div class="user-list" @click="handle('/user/list')">
                                <div>榜单明细</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                        </li>
                        <!-- Menu Footer-->
                        <li class="user-footer">
                            <div>
                                <a href="/user/logout"><i class="fa fa-sign-out"></i>
                                    {:__('Logout')}</a>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="header-right" v-else   @click="handle('/login',false)">
                    <i class="fa fa-list-alt header-icon" ></i>
                    <div class="user-info">
                        <i class="fa fa-user-circle fa-fw header-icon" style="margin-right: 5px;"></i>
                        <span class="user-name">登录</span>
                    </div>
                </div>
                
            </div>
        </header>

        <section class="container">
            <div class="row">
                <div class="col-xs-12" style="position: relative;">
                    <img src="/assets/img/bg.jpg" width="100%" height="auto">
                    <div style="position: absolute; bottom: 30px; left:50px; color: #fff; font-size: 32px;">
                       
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <div style="padding:15px;display: flex; align-items: center; background-color: #fff;">
                        <img src="{$user.avatar}" width="100" height="100" style="margin-right: 10px; border:2px solid #e08e0b;border-radius: 50%;">
                        <div style="display: flex; flex-direction: column;">
                            <div style="font-size: 18px; color:#333;margin-bottom: 10px; display: flex; align-items: center;">
                                <span style="font-size:14px;padding:4px 8px;background:#e0830b;border-radius: 3px;color:#fff;margin-right: 5px;">闻道ID：{$user.id}</span>
                                {$user.nickname}
                                {volist name="group" id ="vo"}
                                 {empty name="vo.image"}
                                    <span style="font-size:12px;padding:4px 8px;background:#e0830b;border-radius: 3px;color:#fff;margin-left: 5px;">{$vo.name}</span>
                                 {else/}
                                 <img src="{$vo.image}" width="60" height="30" style="margin-left: 5px;"> 
                                {/empty}
                                {/volist}
                            </div>
                            <div style="font-size: 14px; color:#666;">发表主题:{$a}篇，发表评论{$p}条</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-10 col-xs-12">
                    <div class="content">
                        <div class="content-header" style="margin-bottom: 10px;">
                            <div class="nav-tabs">
                                <a  href="javascript:;" class="nav-tab">帖子</a>
                                <a  href="/member/favorites?id={$id}" class="nav-tab active">收藏</a>
                                <a  href="/member/comments?id={$id}" class="nav-tab">评论</a>
                                <a  href="/member/adviser?id={$id}" class="nav-tab">实战活动</a>
                            </div>
                        </div>
                        <div class="content-body">
                            <ul class="article-list">
                                <li class="article-item" v-for="(item,index) in list">
                                    <template v-if="selectTabble">
                                        <div class="article-header" v-if="commondata.includes(item.type)">
                                            <img :src="item.user.avatar?item.user.avatar:`/assets/img/avatar.png`" class="article-avatar" alt="用户头像">
                                            <div class="user-tit">
                                                <div  class="name">
                                                    <h3>{{item.user.nickname}}</h3>
                                                    <template v-if="item.user.group_image.length>0">
                                                    <img :src="it.image" width="60" height="30" style="margin-left:10px" v-for="(it,id) in item.user.group_image">
                                                    </template>
                                                </div>
                                                <div class="time">{{item.createtime}}</div>
                                            </div>
                                        </div>
                                        <div class="article-header" @click="handle('/member/index?id='+item.user.id,true)" v-else>
                                            <img :src="item.user.avatar?item.user.avatar:`/assets/img/avatar.png`" class="article-avatar" alt="用户头像">
                                            <div class="user-tit">
                                                <div  class="name">
                                                    <h3>{{item.user.nickname}}</h3>
                                                    <template v-if="item.user.group_image.length>0">
                                                    <img :src="it.image" width="60" height="30" style="margin-left:10px" v-for="(it,id) in item.user.group_image">
                                                    </template>
                                                </div>
                                                <div class="time">{{item.createtime}}</div>
                                            </div>
                                            <div style="width:80px;">
                                                <button type="btn" @click='handleAttention(item.user.id)'>+ 关注</button>
                                            </div>
                                        </div>
                                    </template>
                                    <div class="article-content" @click="handleDetail(item,true)">
                                        <div style="display: flex; align-items: center; margin-bottom: 12px;" >
                                            <img src="/assets/img/jh.jpg" width="50" height="25" v-if="item.is_featured==1">
                                            <div style="font-size: 16px; font-weight: 500;flex:1;">{{item.title}}</div>
                                            <div v-if="!selectTabble" style="width:100px;">{{item.user.nickname}}</div>
                                        </div>
                                        <div v-if="selectTabble">
                                            <span v-if="item.is_shang == '1'"> #令牌悬赏# </span> 
                                            <span v-if="item.type == 'wf' " @click="handle('wfgroup/index',true)">#闻风楼#</span> {{item.content}}
                                        </div>
                                    </div>
                                    <div class="article-footer" v-if="selectTabble">
                                        <div class="article-tags" v-if="item.type =='wd'">
                                            <span class="badge" style="cursor: pointer;" v-for="(itm,idx) in item.document.tags" @click="handle('/wdgroup?wdid='+itm.id,true)"># {{itm.name}}</span> 
                                        </div>
                                        <div class="article-tags" v-if="item.type =='wf'">
                                            <span class="badge" v-for="(itm,idx) in item.document.tags"># {{itm.name}}</span>
                                        </div>
                                        <div class="article-tags" v-if="item.type =='wr'">
                                            <span class="badge" @click="handle('/resource',true)"># 资源库</span>
                                        </div>
                                        <div class="article-tags" v-if="item.type =='days'">
                                            <span class="badge" @click="handle('/days',true)"># 会员日</span>
                                        </div>
                                        <div class="article-tags" v-if="item.type =='week'">
                                            <span class="badge" @click="handle('/week',true)"># 闻钱周报</span>
                                        </div>
                                        <div class="article-tags" v-if="item.type =='fa'">
                                            <span class="badge" @click="handle('/favorites',true)"># 闻钱收藏夹</span>
                                        </div>
                                        <div class="article-tags" v-if="item.type =='wd'" >
                                            <span class="badge cate" style="cursor: pointer;" @click="handle('/wdgroup?wdid='+item.document.category.id,true)"> <img :src="item.document.category.image?item.document.category.image:`/assets/img/logo.png`" width="22" height="22"> {{item.document.category.name}}<span>进入小组查看更多</span></span>
                                        </div>
                                        <div style="display: flex;">
                                            <div class="article-stats" style="flex:1;" v-if="user">
                                                <div class="stat-item" @click="showFlag(item.id)" v-if="wdgroud.includes(item.type)">
                                                    <i class="fa fa-font-awesome"></i>
                                                    <span>{{item.flag}}</span>
                                                </div>
                                                <div class="stat-item" v-else>
                                                    <i class="fa fa-font-awesome"></i>
                                                    <span>{{item.flag}}</span>
                                                </div>
                                                <div class="stat-item" @click="showFollow(item.id)">
                                                    <i class="fa fa-thumbs-o-up"></i>
                                                    <span>{{item.likes}}</span>
                                                </div>
                                                <div class="stat-item" @click="showComment(item.id)">
                                                    <i class="fa fa-commenting-o"></i>
                                                    <span>{{item.comments}}</span>
                                                </div>
                                                
                                            </div>
                                            <div class="article-stats" style="flex:1;" v-else>
                                                <div class="stat-item">
                                                    <i class="fa fa-font-awesome"></i>
                                                    <span>{{item.flag}}</span>
                                                </div>
                                                <div class="stat-item">
                                                    <i class="fa fa-thumbs-o-up"></i>
                                                    <span>{{item.likes}}</span>
                                                </div>
                                                <div class="stat-item">
                                                    <i class="fa fa-commenting-o"></i>
                                                    <span>{{item.comments}}</span>
                                                </div>
                                            </div>
                                            
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="col-md-2">
                    <div style="background:#fff;">
                        <div style="padding:10px;display:flex;align-items: center;border-bottom: 1px solid #f1f1f1;">
                            <div style="color:#000;font-size: 16px; flex:1">令牌信息</div>
                            <div style="color:#666;font-size: 14px;width:80px;" @click="handle('{$wqurl}',false)"><i class="fa fa-question-circle"></i> 令牌介绍</div>
                        </div>
                        <div style="padding:10px; display: flex;align-items: center;">
                            <div style="color:#000;font-size: 16px; flex:1">令牌</div>
                            <div style="color:#666;font-size: 14px;width:80px;">{$l}</div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
</body>
<script src="/assets/js/require.js" data-main="/assets/js/require-frontend.js?v={$site.version|htmlentities}"></script>
</html>
